-
Notifications
You must be signed in to change notification settings - Fork 187
Handle Checkbox ImageList scaling in Table in win32 #2801
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Handle Checkbox ImageList scaling in Table in win32 #2801
Conversation
Test Results 118 files ±0 118 suites ±0 16m 40s ⏱️ - 1m 6s Results for commit 521d007. ± Comparison against base commit 28bb9b4. This pull request skips 2 tests.♻️ This comment has been updated with latest results. |
This commit handles scaling of ImageList in a table on DPI_CHANGE event by destroying the current imagelist and recalculating the height of the table item and then creating a new imagelist using the new size.
b35bfd4 to
521d007
Compare
| long oldhImageList = OS.SendMessage(handle, OS.LVM_GETIMAGELIST, OS.LVSIL_SMALL, 0); | ||
| long hImageList = OS.ImageList_Create (1, 1, 0, 0, 0); | ||
| OS.SendMessage (handle, OS.LVM_SETIMAGELIST, OS.LVSIL_STATE, hImageList); | ||
| OS.SendMessage (handle, OS.LVM_SETIMAGELIST, OS.LVSIL_SMALL, hImageList); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
cant we get the old image lists from the LVM_SETIMAGELIST instead of LVM_GETIMAGELIST?
| OS.SendMessage (handle, OS.LVM_SETIMAGELIST, OS.LVSIL_SMALL, hImageList); | |
| long hImageList = OS.ImageList_Create (1, 1, 0, 0, 0); | |
| long oldStateImageList = OS.SendMessage (handle, OS.LVM_SETIMAGELIST, OS.LVSIL_STATE, hImageList); | |
| long oldhImageList =OS.SendMessage (handle, OS.LVM_SETIMAGELIST, OS.LVSIL_SMALL, hImageList); |
| if((style & SWT.CHECK) != 0 ) { | ||
| destroyImageList(); | ||
| int size = getItemHeightInPixels(); | ||
| setCheckboxImageList(size, size, false); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@amartya4256 previously setCheckboxImageList was called with height and width of the icon and fixScroll true, why do we consider only the height now, is it because the checkbox is always square I see no visual regressions but just slightly confused why the height and width can be passed when setting checklbox ImageList, also why is fixscroll now false?
This PR handles scaling of ImageList in a table on DPI_CHANGE event by destroying the current imagelist and recalculating the height of the table item and then creating a new imagelist using the new size.
How to test:
Before:

After:
